** Replication file for Multiple Hypothesis Testing

** Replicates the results in 
* Table 4, Panel B, Columns (1) - (4)
* Table A.1., column (3) 
* Table A.3, columns (5) and (6)


* REVISE: TO ERASE THIS PATH LATER
global rootdir "/Users/constancaesteves/Dropbox/1-Research/IM/IM-Results/Tables and Struture_Sept 2012-Rosario/"
cd "$rootdir"

clear all
set matsize 1000
set maxvar 20000
set more off
pause on

clear
use replication-2.dta




****************************************************** 
* Table 4, Panel B, Columns (1) and (3); and Table A.3, column (5) 

*Create dataset for MHT in week 1 

keep if week==1

keep evaluations mineval minutes week leg treat

drop if evaluations==.

*** rename treatments to make the Control=0 (required by  List et al MHT procedure)

replace treat=0 if treat==1
replace treat=1 if treat==2
replace treat=2 if treat==3

***
save mht-w1.dta, replace

**
mata: mata mlib index
mhtexp evaluations mineval minutes, treatment(treat) 

/* Results extracted for the last time in May 24, 2020; with existing default seeds from the procedure.

. mhtexp evaluations mineval minutes, treatment(treat) 

             |   outcome   subgroup  treatme~1  treatme~2  diff_in~s  Remark3_1     Thm3_1  Remark3_7       Bonf       Holm 
-------------+--------------------------------------------------------------------------------------------------------------
          r1 |         1          1          0          1   18.30731   .0003333   .0003333   .0003333       .002   .0016667 
          r2 |         1          1          0          2   21.41842   .0003333   .0003333   .0003333       .002       .002 
          r3 |         2          1          0          1   .9257789   .0003333   .0003333   .0003333       .002   .0013333 
          r4 |         2          1          0          2   .8481779   .0006667   .0013333   .0013333       .004       .002 
          r5 |         3          1          0          1   22.70571       .024       .024       .024       .144       .024 
          r6 |         3          1          0          2   32.15015       .001   .0016667   .0016667       .006       .002 

*/



**********************************
*Create dataset for MHT in week 2 
* Table 4, Panel B, Columns (2) and (4); Table A.3, column (6); and Table A.1., column (3) 

clear
use replication-2.dta



keep if week==2


keep evaluations mineval minutes week leg treat quit


*** rename treatments to make the Control=0

replace treat=0 if treat==1
replace treat=1 if treat==2
replace treat=2 if treat==3

******

save mht-w2.dta, replace


mata: mata mlib index
mhtexp evaluations mineval minutes quit, treatment(treat) 


/* Results extracted for the last time in May 24, 2020; with existing default seeds from the procedure.

. mhtexp evaluations mineval minutes quit, treatment(treat) 

             |   outcome   subgroup  treatme~1  treatme~2  diff_in~s  Remark3_1     Thm3_1  Remark3_7       Bonf       Holm 
-------------+--------------------------------------------------------------------------------------------------------------
          r1 |         1          1          0          1   3.624434   .3146667   .7426667   .7426667          1          1 
          r2 |         1          1          0          2   6.184874   .1546667       .509       .509          1   .7733333 
          r3 |         2          1          0          1   .7833741       .005   .0306667   .0306667        .04        .04 
          r4 |         2          1          0          2   .1005149   .7956667   .7956667   .7956667          1   .7956667 
          r5 |         3          1          0          1   5.552036   .4506667   .8316667   .8316667          1          1 
          r6 |         3          1          0          2   15.38936   .1346667       .559       .559          1   .9426667 
          r7 |         4          1          0          1    .044044   .4876667   .7323333   .7323333          1   .9753333 
          r8 |         4          1          0          2   .1411411       .137        .53        .53          1       .822 


*/




*********
